//
//  ZJNotMineView.m
//  ZiJinLian
//
//  Created by lzy on 2017/3/16.
//  Copyright © 2017年 lzy. All rights reserved.
//

#import "ZJNotMineView.h"

@implementation ZJNotMineView

-(id)initWithFrame:(CGRect)frame
{
    self=[super initWithFrame:frame];
    if (self) {
        self.backgroundColor=RGB(246, 246, 246);
        [self CreatUI];

    }
    return self;
}


-(void)layoutSubviews
{
    [super layoutSubviews];
    [self layOUT];
}
-(void)CreatUI
{
    //头像[UIImage imageNamed:@"img_head_nor"]
    _headBtn=[MYUI creatButtonFrame:CGRectMake(0, 0, 0, 0) setBackgroundImage:[UIImage imageNamed:@"img_head_nor"] setTitle:nil setTitleColor:TextColor3];
    _headBtn.layer.cornerRadius=30;
    _headBtn.layer.masksToBounds=YES;
    [self addSubview:self.headBtn];
    //nameLab
    self.nameLab=[MYUI createLableFrame:CGRectMake(0, 0, 0, 0) backgroundColor:[UIColor clearColor] text:nil textColor:TextColor3 font:FontAndStyle14 numberOfLines:0 adjustsFontSizeToFitWidth:YES];
    self.nameLab.textAlignment=NSTextAlignmentCenter;
    [self addSubview:self.nameLab];
    //提示
    _reminderLab=[MYUI createLableFrame:CGRectMake(0, 0, 0, 0) backgroundColor:[UIColor clearColor] text:MyString(@"该手机已经绑定，请确认是否您的账户") textColor:TextColor3 font:FontAndStyle14 numberOfLines:0 adjustsFontSizeToFitWidth:YES];
    _reminderLab.textAlignment=NSTextAlignmentCenter;
    [self addSubview:self.reminderLab];
    //btn登陆
    _goLogBtn=[MYUI creatButtonFrame:CGRectMake(0,0,0,0) backgroundColor:button_Red_Color setTitle:MyString(@"是的，立即登陆") setTitleColor:[UIColor whiteColor]  ];
    _goLogBtn.layer.cornerRadius=5;
    _goLogBtn.layer.masksToBounds=YES;
    _goLogBtn.titleLabel.font=FontAndStyle15;
    [self addSubview:self.goLogBtn];
    
    
    //btn注册
    _goregister=[MYUI creatButtonFrame:CGRectMake(0,0,0,0) backgroundColor:button_Red_Color setTitle:MyString(@"不是我的，继续注册") setTitleColor:[UIColor whiteColor] ];
    _goregister.layer.cornerRadius=5;
    _goregister.layer.masksToBounds=YES;
    _goregister.titleLabel.font=FontAndStyle15;
    [self addSubview:self.goregister];
    
    
}

-(void)layOUT
{
    [_headBtn makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(self.top).offset(40);
        make.width.and.height.equalTo(60);
        
    }];
    [self.nameLab makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(self.headBtn.bottom).offset(10);
        make.size.equalTo(CGSizeMake(150, 30));
    }];
    
    [_reminderLab makeConstraints:^(MASConstraintMaker *make) {
       make.top.equalTo(self.nameLab.bottom).offset(40);
        make.left.equalTo(self.left).offset(0);
        make.right.equalTo(self.right).offset(0);
        make.height.equalTo(98/2);
        
    }];
    [_goLogBtn makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.reminderLab.bottom).offset(40);
        make.left.equalTo(self.left).offset(10);
        make.right.equalTo(self.right).offset(-10);
        make.height.equalTo(98/2);
        
    }];
    [_goregister makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.goLogBtn.bottom).offset(10);
        make.left.and.right.equalTo(self.goLogBtn);
        make.size.equalTo(self.goLogBtn);
        
    }];
    

    
}
@end
